3.6.81 \(\int \frac {c+d x^{-1+n}}{a+b x^n} \, dx\) [581]

Optimal. Leaf size=42 \[ \frac {c x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a}+\frac {d \log \left (a+b x^n\right )}{b n} \]

[Out]

c*x*hypergeom([1, 1/n],[1+1/n],-b*x^n/a)/a+d*ln(a+b*x^n)/b/n

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {1905, 251, 266} \begin {gather*} \frac {c x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a}+\frac {d \log \left (a+b x^n\right )}{b n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x^(-1 + n))/(a + b*x^n),x]

[Out]

(c*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])/a + (d*Log[a + b*x^n])/(b*n)

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 1905

Int[((A_) + (B_.)*(x_)^(m_.))*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[A, Int[(a + b*x^n)^p, x], x] +
 Dist[B, Int[x^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, A, B, m, n, p}, x] && EqQ[m - n + 1, 0]

Rubi steps

\begin {align*} \int \frac {c+d x^{-1+n}}{a+b x^n} \, dx &=c \int \frac {1}{a+b x^n} \, dx+d \int \frac {x^{-1+n}}{a+b x^n} \, dx\\ &=\frac {c x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a}+\frac {d \log \left (a+b x^n\right )}{b n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 48, normalized size = 1.14 \begin {gather*} \frac {c x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {b x^n}{a}\right )}{a}+\frac {d \left (n \log (x)+\log \left (a-a x^n\right )\right )}{b n} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(c + d*x^(-1 + n))/(a + b*x^n),x]

[Out]

(c*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])/a + (d*(n*Log[x] + Log[a - a*x^n]))/(b*n)

________________________________________________________________________________________

Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \frac {c +d \,x^{-1+n}}{a +b \,x^{n}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*x^(-1+n))/(a+b*x^n),x)

[Out]

int((c+d*x^(-1+n))/(a+b*x^n),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^(-1+n))/(a+b*x^n),x, algorithm="maxima")

[Out]

d*log(x)/b + integrate((b*c*x - a*d)/(b^2*x*x^n + a*b*x), x)

________________________________________________________________________________________

Fricas [F]
time = 0.38, size = 21, normalized size = 0.50 \begin {gather*} {\rm integral}\left (\frac {d x^{n - 1} + c}{b x^{n} + a}, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^(-1+n))/(a+b*x^n),x, algorithm="fricas")

[Out]

integral((d*x^(n - 1) + c)/(b*x^n + a), x)

________________________________________________________________________________________

Sympy [A]
time = 6.20, size = 65, normalized size = 1.55 \begin {gather*} d \left (\begin {cases} \frac {\log {\left (x \right )}}{a} & \text {for}\: b = 0 \wedge n = 0 \\\frac {x^{n}}{a n} & \text {for}\: b = 0 \\\frac {\log {\left (x \right )}}{a + b} & \text {for}\: n = 0 \\\frac {\log {\left (\frac {a}{b} + x^{n} \right )}}{b n} & \text {otherwise} \end {cases}\right ) + \frac {c x \Phi \left (\frac {b x^{n} e^{i \pi }}{a}, 1, \frac {1}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{a n^{2} \Gamma \left (1 + \frac {1}{n}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x**(-1+n))/(a+b*x**n),x)

[Out]

d*Piecewise((log(x)/a, Eq(b, 0) & Eq(n, 0)), (x**n/(a*n), Eq(b, 0)), (log(x)/(a + b), Eq(n, 0)), (log(a/b + x*
*n)/(b*n), True)) + c*x*lerchphi(b*x**n*exp_polar(I*pi)/a, 1, 1/n)*gamma(1/n)/(a*n**2*gamma(1 + 1/n))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*x^(-1+n))/(a+b*x^n),x, algorithm="giac")

[Out]

integrate((d*x^(n - 1) + c)/(b*x^n + a), x)

________________________________________________________________________________________

Mupad [B]
time = 5.33, size = 43, normalized size = 1.02 \begin {gather*} \frac {c\,x\,{{}}_2{\mathrm {F}}_1\left (1,\frac {1}{n};\ \frac {1}{n}+1;\ -\frac {b\,x^n}{a}\right )}{a}+\frac {d\,\ln \left (a+b\,x^n\right )}{b\,n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^(n - 1))/(a + b*x^n),x)

[Out]

(c*x*hypergeom([1, 1/n], 1/n + 1, -(b*x^n)/a))/a + (d*log(a + b*x^n))/(b*n)

________________________________________________________________________________________